#ifndef _KEYBOARD_SDL_
#define _KEYBOARD_SDL_

#include "../sleipner_config.h"
#ifdef _PLATFORM_SDL
#include <vector>
#include "keyboard.h"

#ifdef _SDL2
    #include "SDL2/include/SDL.h"

#else
    #include "SDL-1.2.13/include/SDL.h"
#endif

/// provide a keymap for each platform
enum		KEY_MAP
{
	
	KEY_0				= SDLK_0,
	KEY_1,               
	KEY_2,
	KEY_3,
	KEY_4,
	KEY_5,
	KEY_6,
	KEY_7,
	KEY_8,
	KEY_9,
	
	KEY_A				= SDLK_a,
	KEY_B,
	KEY_C,
	KEY_D,
	KEY_E,
	KEY_F,
	KEY_G,
	KEY_H,
	KEY_I,
	KEY_J,
	KEY_K,
	KEY_L,
	KEY_M,
	KEY_N,
	KEY_O,
	KEY_P,
	KEY_Q,
	KEY_R,
	KEY_S,
	KEY_T,
	KEY_U,
	KEY_V,
	KEY_W,
	KEY_X,
	KEY_Y,
	KEY_Z,

	KEY_EQUALS          = SDLK_EQUALS,
	KEY_LBRACKET        = SDLK_LEFTBRACKET,
	KEY_RBRACKET        = SDLK_RIGHTBRACKET,
	KEY_SEMICOLON       = SDLK_SEMICOLON ,
	KEY_APOSTROPHE      = SDLK_QUOTE,
	KEY_BACKSLASH       = SDLK_BACKSLASH,
	KEY_SLASH           = SDLK_SLASH,
	KEY_ESCAPE          = SDLK_ESCAPE,
	KEY_PLUS			= SDLK_PLUS,
	KEY_MINUS           = SDLK_MINUS,
	KEY_BACKSPACE		= SDLK_BACKSPACE,
	KEY_TAB             = SDLK_TAB,
	KEY_RETURN          = SDLK_RETURN,
	KEY_LCONTROL        = SDLK_LCTRL,
	KEY_GRAVE           = SDLK_BACKQUOTE,
	KEY_COMMA           = SDLK_COMMA,
	KEY_PERIOD          = SDLK_PERIOD,
	KEY_LSHIFT          = SDLK_LSHIFT,
	KEY_RSHIFT          = SDLK_RSHIFT,
	KEY_MULTIPLY        = SDLK_ASTERISK,
	KEY_LMENU           = SDLK_LALT,
	KEY_RMENU           = SDLK_RALT,
	KEY_SPACE           = SDLK_SPACE,
	KEY_CAPITAL         = SDLK_CAPSLOCK,

	KEY_F1              = SDLK_F1, 
	KEY_F2, 
	KEY_F3, 
	KEY_F4, 
	KEY_F5, 
	KEY_F6, 
	KEY_F7, 
	KEY_F8, 
	KEY_F9, 
	KEY_F10,
	KEY_F11,
	KEY_F12,
	KEY_F13, 
	KEY_F14,  
	KEY_F15,  

	KEY_SUBTRACT        = SDLK_MINUS,
	
	KEY_ADD             = SDLK_KP_PLUS,
	KEY_DECIMAL         = SDLK_KP_PERIOD,
	KEY_NUMPADENTER     = SDLK_KP_ENTER,
	KEY_RCONTROL        = SDLK_RCTRL,
	KEY_NUMPADCOMMA     = SDLK_COMMA,
	KEY_DIVIDE          = SDLK_KP_DIVIDE,
	KEY_PAUSE           = SDLK_PAUSE,
	KEY_HOME            = SDLK_HOME,

	KEY_UP              = SDLK_UP,	
	KEY_LEFT            = SDLK_LEFT, 
	KEY_RIGHT           = SDLK_RIGHT,
	KEY_DOWN            = SDLK_DOWN, 

	KEY_END             = SDLK_END,  	
	KEY_PRIOR           = SDLK_PAGEUP,
	KEY_NEXT            = SDLK_PAGEDOWN,
	KEY_INSERT          = SDLK_INSERT, 
	KEY_DELETE          = SDLK_DELETE,
    
#if  defined(_SDL2) 
	KEY_LWIN            = SDLK_LGUI,
	KEY_RWIN            = SDLK_RGUI,
	KEY_PRINTSCR        = SDLK_PRINTSCREEN,
    KEY_NUMLOCK         = SDLK_NUMLOCKCLEAR,
	KEY_SCROLL          = SDLK_SCROLLLOCK,
	
	KEY_NUMPAD1         = SDLK_KP_1,
	KEY_NUMPAD2         = SDLK_KP_2,
	KEY_NUMPAD3         = SDLK_KP_3,
	KEY_NUMPAD4         = SDLK_KP_4,
	KEY_NUMPAD5         = SDLK_KP_5,
	KEY_NUMPAD6         = SDLK_KP_6,
	KEY_NUMPAD7         = SDLK_KP_7,
	KEY_NUMPAD8         = SDLK_KP_8,
	KEY_NUMPAD9         = SDLK_KP_9,
	KEY_NUMPAD0         = SDLK_KP_0,
#else
    
	KEY_LWIN            = SDLK_LSUPER,
	KEY_RWIN            = SDLK_RSUPER,
	KEY_PRINTSCR        = SDLK_PRINT,
    KEY_NUMLOCK         = SDLK_NUMLOCK,
	KEY_SCROLL          = SDLK_SCROLLOCK,
	
	KEY_NUMPAD1         = SDLK_KP1,
	KEY_NUMPAD2         = SDLK_KP2,
	KEY_NUMPAD3         = SDLK_KP3,
	KEY_NUMPAD4         = SDLK_KP4,
	KEY_NUMPAD5         = SDLK_KP5,
	KEY_NUMPAD6         = SDLK_KP6,
	KEY_NUMPAD7         = SDLK_KP7,
	KEY_NUMPAD8         = SDLK_KP8,
	KEY_NUMPAD9         = SDLK_KP9,
	KEY_NUMPAD0         = SDLK_KP0,
    
#endif
    
};

#endif //_PLATFORM_SDL
#endif // _KEYBOARD_SDLH_